<template>
  <div class="item pc-item text-center" @click="handleToReview(item.userId)">
    <div class="user-pic">
      <img width="110" height="110" :src="'https://kegonghui.oss-cn-beijing.aliyuncs.com/'+item.headimg+'?x-oss-process=image/circle,r_100'" class="img-circle" alt="...">
    </div>
    <p class="user-name">{{item.name}}</p>
    <div class="user-info">
      <p class="user-work">北京智工科技有限{{item.workCompany}}</p>
      <p class="user-education">
        <span>{{item.educationalBackground}}</span>
        <span>{{item.workYear}}年</span>
      </p>
      <div class="text-left user-desc">
        <p>个人简介：{{item.desc}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "expert-item",
  props: ["item"],
  methods: {
    handleToReview(uid) {
      window.open("/#/expert-review/" + uid);
    }
  }
};
</script>

<style lang="scss" scoped>
.item {
  display: block;
  position: relative;
  line-height: 1.42857143;
  background-color: #f7f5f5;
  border-radius: 10px;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  color: #212121;
  &:hover {
    box-shadow: 0 8px 16px 0 rgba(7, 17, 27, 0.1);
  }
  .user-pic {
    height: 170px;
    line-height: 170px;
    background: #eee;
    border-radius: 10px 10px 0 0;
  }
  .user-name {
    position: absolute;
    top: 154px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 24px;
  }
  .user-info {
    height: 258px;
    padding: 30px 20px;
    margin: 0 auto;
    .user-work {
      font-size: 16px;
    }
    .user-education {
      // font-size: 16px;
      padding: 0px 20px;
      margin-bottom: 20px;
      text-align: center;
      color: #b8b8b8;
      span {
        width: 50%;
        display: inline-block;
      }
    }
    .user-desc {
      line-height: 25px;
      color: #b8b8b8;
      //多行文本
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 5;
      -webkit-box-orient: vertical;
      p {
        margin: 0;
      }
    }
  }
}
</style>